home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Aminet 15
/
Aminet 15 - Nov 1996.iso
/
Aminet
/
dev
/
gcc
/
ixemsdk.lha
/
man
/
cat3
/
strftime.0
< prev
next >
Wrap
Text File
|
1996-09-02
|
5KB
|
133 lines
STRFTIME(3) UNIX Programmer's Manual STRFTIME(3)
NNAAMMEE
ssttrrffttiimmee - format date and time
SSYYNNOOPPSSIISS
##iinncclluuddee <<ttiimmee..hh>>
_s_i_z_e___t
ssttrrffttiimmee(_c_h_a_r _*_b_u_f, _s_i_z_e___t _m_a_x_s_i_z_e, _c_o_n_s_t _c_h_a_r _*_f_o_r_m_a_t,
_c_o_n_s_t _s_t_r_u_c_t _t_m _*_t_i_m_e_p_t_r)
DDEESSCCRRIIPPTTIIOONN
The ssttrrffttiimmee() function formats the information from _t_i_m_e_p_t_r into the
buffer _b_u_f according to the string pointed to by _f_o_r_m_a_t.
The _f_o_r_m_a_t string consists of zero or more conversion specifications and
ordinary characters. All ordinary characters are copied directly into
the buffer. A conversion specification consists of a percent sign `%'
and one other character.
No more than _m_a_x_s_i_z_e characters will be placed into the array. If the
total number of resulting characters, including the terminating null
character, is not more than _m_a_x_s_i_z_e, ssttrrffttiimmee() returns the number of
characters in the array, not counting the terminating null. Otherwise,
zero is returned.
Each conversion specification is replaced by the characters as follows
which are then copied into the buffer.
%%AA is replaced by the locale's full weekday name.
%%aa is replaced by the locale's abbreviated weekday name.
%%BB is replaced by the locale's full month name.
%%bb or %%hh
is replaced by the locale's abbreviated month name.
%%CC is replaced by the century (a year divided by 100 and truncated to
an integer) as a decimal number (00-99).
%%cc is replaced by the locale's appropriate date and time representa-
tion.
%%DD is replaced by the date in the format ``%m/%d/%y''.
%%dd is replaced by the day of the month as a decimal number (01-31).
%%ee is replaced by the day of month as a decimal number (1-31); single
digits are preceded by a blank.
%%HH is replaced by the hour (24-hour clock) as a decimal number
(00-23).
%%II is replaced by the hour (12-hour clock) as a decimal number
(01-12).
%%jj is replaced by the day of the year as a decimal number (001-366).
%%kk is replaced by the hour (24-hour clock) as a decimal number (0-23);
single digits are preceded by a blank.
%%ll is replaced by the hour (12-hour clock) as a decimal number (1-12);
single digits are preceded by a blank.
%%MM is replaced by the minute as a decimal number (00-59).
%%mm is replaced by the month as a decimal number (01-12).
%%nn is replaced by a newline.
%%pp is replaced by the locale's equivalent of either ``AM'' or ``PM''.
%%RR is replaced by the time in the format ``%H:%M''.
%%rr is replaced by the locale's representation of 12-hour clock time
using AM/PM notation.
%%TT is replaced by the time in the format ``%H:%M:%S''.
%%tt is replaced by a tab.
%%SS is replaced by the second as a decimal number (00-60).
%%ss is replaced by the number of seconds since the Epoch, UCT (see
mktime(3)).
%%UU is replaced by the week number of the year (Sunday as the first day
of the week) as a decimal number (00-53).
%%uu is replaced by the weekday (Monday as the first day of the week) as
a decimal number (1-7).
%%VV is replaced by the week number of the year (Monday as the first day
of the week) as a decimal number (01-53). If the week containing
January 1 has four or more days in the new year, then it is week 1;
otherwise it is week 53 of the previous year, and the next week is
week 1.
%%WW is replaced by the week number of the year (Monday as the first day
of the week) as a decimal number (00-53).
%%ww is replaced by the weekday (Sunday as the first day of the week) as
a decimal number (0-6).
%%XX is replaced by the locale's appropriate date representation.
%%xx is replaced by the locale's appropriate time representation.
%%YY is replaced by the year with century as a decimal number.
%%yy is replaced by the year without century as a decimal number
(00-99).
%%ZZ is replaced by the time zone name.
%%%% is replaced by `%'.
SSEEEE AALLSSOO
date(1), ctime(3), printf(1), printf(3)
SSTTAANNDDAARRDDSS
The ssttrrffttiimmee() function conforms to ANSI C3.159-1989 (``ANSI C''). The
`%C', `%D', `%e', `%h', `%k', `%l', `%n', `%r', `%R', `%s'. `%t', `%T',
`%u', and `%V' conversion specifications are extensions.
BBUUGGSS
There is no conversion specification for the phase of the moon.